<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>

<body>
	<script>
		console.log(this);
		const obj = {
			sayThis: () => {
				console.log(this);
			}
		};

		obj.sayThis(); // window 因为 JavaScript 没有块作用域，所以在定义 sayThis 的时候，里面的 this 就绑到 window 上去了
		// const globalSay = obj.sayThis;
		// globalSay(); // window 浏览器中的 global 对象

		var c = {
			d: {
				f: obj.sayThis
			}
		}

		c.d.f.apply(c)


	</script>
</body>

</html>